package com.ctshk.sapp.order.tour.controller;


import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.order.tour.service.ISeriesOrderReceiptDetailsService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/**
 * <p>
 * 收据明细表、每一笔收据，产生一个数据 前端控制器
 * </p>
 *
 * @author 谭响
 * @since 2021-02-20
 */
@RestController
@RequestMapping("/series/order/receipt/details")
public class SeriesOrderReceiptDetailsController extends BaseController {

    @DubboReference
    private ISeriesOrderReceiptDetailsService iSeriesOrderReceiptDetailsService;

    /*@ApiOperation(value = "预览", notes = "预览（收據管理-打印收據-打印预览）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.QUERY, operTitle = "收據管理-打印收據-打印预览", operDesc = "收據管理-打印收據-打印预览")
    @PostMapping("/preview")
    public Result<SeriesOrderReceiptDetailsPreviewDTO> preview(@RequestBody SeriesOrderReceiptDetailsPreviewReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderReceiptDetailsService.preview(req);
    }*/

    /*@ApiOperation(value = "详情", notes = "详情（收據管理-查看）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.QUERY, operTitle = "收據管理-查看", operDesc = "收據管理-查看")
    @PostMapping("/detail")
    public Result detail(@RequestBody SeriesOrderReceiptDetailsDetailReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderReceiptDetailsService.detail(req);
    }*/


    /*@ApiOperation(value = "添加", notes = "添加（銷售收據-打印）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.ADD, operTitle = "銷售收據-打印", operDesc = "銷售收據-打印")
    @PostMapping("/add")
    public Result add(@RequestBody SeriesOrderReceiptDetailsAddReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderReceiptDetailsService.add(req);
    }

    @ApiOperation(value = "重印", notes = "重印（收據管理-重印）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.UPDATE, operTitle = "收據管理-重印", operDesc = "收據管理-重印")
    @PostMapping("/redo")
    public Result redo(@RequestBody SeriesOrderReceiptDetailsRedoReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderReceiptDetailsService.redo(req);
    }

    @ApiOperation(value = "作废", notes = "作废（收據管理-作廢）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.UPDATE, operTitle = "收據管理-作廢", operDesc = "收據管理-作廢")
    @PostMapping("/invalid")
    public Result invalid(@RequestBody SeriesOrderReceiptInvalidReq req) {
        return iSeriesOrderReceiptDetailsService.invalid(req, getCurrentUser(getRequest()));
    }

    @ApiOperation(value = "作废所有", notes = "作废（收據管理-打印整單收據）")
    @OperationLogAnnotation(operModul = OperationLogModel.ORDER, operType = OperationLogType.UPDATE, operTitle = "收據管理-打印整單收據", operDesc = "收據管理-打印整單收據")
    @PostMapping("/invalid/all")
    public Result invalidAll(@RequestBody SeriesOrderReceiptInvalidAllReq req) {
        req.setUserId(getCurrentUser(getRequest()).getId());
        return iSeriesOrderReceiptDetailsService.invalidAll(req);
    }*/

}
